home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Science⁄Math / VideoToolbox / VideoToolboxSources / DateString.c < prev    next >
Text File  |  1993-12-19  |  486b  |  19 lines

  1. /*
  2. DateString.c
  3. returns a pointer to a string representing the time in a form suitable for
  4. use as a unique filename extension, e.g. "89.06.25.01.59.59", that 
  5. sorts in chronological order.
  6. HISTORY:
  7. 1989 dgp wrote it.
  8. */
  9. #include "VideoToolbox.h"
  10.  
  11. char *DateString(unsigned long seconds)
  12. {
  13.     DateTimeRec t;
  14.     static char dateString[26];
  15.     
  16.     Secs2Date(seconds,&t);
  17.     sprintf(dateString,"%02d.%02d.%02d.%02d.%02d.%02d",t.year-1900,t.month,t.day,t.hour,t.minute,t.second);
  18.     return dateString;
  19. }